package com.dhcc.bpm.modules.metadata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dhcc.bpm.modules.metadata.entity.ServerApiMetadata;
import com.dhcc.bpm.modules.metadata.vo.ServerApiMetadataVO;

import java.util.List;

/**
 * 接口定义数据表 Mapper 接口
 *
 * @author ccab
 * @since 2020-06-03
 */
public interface ServerApiMetadataMapper extends BaseMapper<ServerApiMetadata> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param apiMetadata
	 * @return
	 */
	List<ServerApiMetadataVO> selectApiMetadataPage(IPage page, ServerApiMetadataVO apiMetadata);
	/**
	 * @Description 树形
	 * @Author daina
	 * @Date 15:20 2020/3/26
	 * @param
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.MetadataVO>
	 **/
	List<ServerApiMetadataVO> tree();

	/**
	 * @Description
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param groupId
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.ApiMetadata>
	 **/
	List<ServerApiMetadata> findByGroupId(Long groupId);
	/**
	 * @Description
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param apiId
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.ApiMetadata>
	 **/
	List<ServerApiMetadata> findOtherByApiId(Long apiId);
	/**
	 * @Description
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param apiId
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.ApiMetadata>
	 **/
	List<ServerApiMetadata> findReqObjectByApiId(Long apiId);
	/**
	 * @Description 请求子类
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param apiId
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.ApiMetadata>
	 **/
	List<ServerApiMetadata> findChildByApiId(Long apiId, Long groupId);

	/**
	 * @Description 请求关联表参数
	 * @Author zhangzexu
	 * @Date 11:08 2020/7/28
	 * @param apiId
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.entity.ServerApiMetadata>
	 **/
	ServerApiMetadata findByServerApiId(Long apiId , Long apiMetaDataId,String messageCheck);
	/**
	 * @Description 父类请求参数
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param apiId
	 * @return com.dhcc.bpm.modules.metadata.vo.ApiMetadata
	 **/
	ServerApiMetadata findParentObjectByApiId(Long apiId);
	/**
	 * @Description 响应参数
	 * @Author daina
	 * @Date 15:17 2020/3/26
	 * @param apiId
	 * @return com.dhcc.bpm.modules.metadata.vo.ApiMetadata
	 **/
	ServerApiMetadata findResObjectByApiId(Long apiId);

	/**
	 * @Description 请求参数集合
	 * @Author zhangxiaozhuang
	 * @Date 14:50 2020/6/20
	 * @param opcApiIdReq
	 * @return java.util.List<com.dhcc.bpm.modules.metadata.vo.ApiMetadata>
	 **/
	List<String> getApiIds(Long opcApiIdReq, String inType, Integer bodyType, Long parentId);
}
